<HTML><HEAD><TITLE>lp_add_columns(+Handle, +Columns)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(eplex)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>lp_add_columns(+Handle, +Columns)</H1>
Add new variables as columns to the external solver's matrix.
<DL>
<DT><EM>Handle</EM></DT>
<DD>Handle to a solver state
</DD>
<DT><EM>Columns</EM></DT>
<DD>A list of Variable:ColumnSpecification pairs.
</DD>
</DL>
<H2>Description</H2>
<P>
   Add new variables as columns to the external solver's matrix. This 
   allows non-zero coefficients for the objective and existing constraints
   to be specified for these variables. 
</P><P>
   Each column is specified as a Variable:ColumnSpecification pair.
   Variable is the variable that is being added to the problem, and
   ColumnSpecification is the specification for the non-zero coefficients
   for the column representing the variable in the external solver matrix:
   this is a list of Index:Coefficient pairs. Where index is the index of an
   existing constraint (obtained when the constraint was added using
   lp_add_constraints/4), and coefficient is its coefficient. Index
   can also be the atom 'obj', in which case the coefficient is the objective
   coefficient for the column. If the objective coefficient is specified,
   it must be the first element in the ColumnSpecification list. Each
   constraint coefficient should only occur once. Any index not specified
   is given a zero value.
</P><P>
   Note that lp_add_columns/2 essentially modifies the problem represented
   by Handle. This is not compatible with the view of the problem as a
   compound constraint, and therefore, lp_add_columns/2 can only be used
   for problems that are not eplex instances, and/or have no trigger
   conditions for triggering the external solver. 
</P>
  
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>Handle or Columns are uninstantiated.
<DT><EM>(5) type error </EM>
<DD>A Variable in Columns is already a problem variable for problem represented by Handle.
<DT><EM>(40) stale object handle </EM>
<DD>Handle not valid: solver state had been destroyed by cleanup
<DT><EM>(abort) </EM>
<DD>Handle is an eplex instance problem, or trigger conditions have been specified.
</DL>

</BODY></HTML>
